import styled from 'styled-components'
import { Icon, IconGif } from '@/components/Icon'
import { StyledContainer } from '../Container'

/* Icon相关 */
export const CompanyLogoIcon = styled(Icon)`
	background-position: 0px -2148px;
	width: 116px;
	height: 16px;
	line-height: 16px;
`

export const SplitIcon = styled(Icon)`
	background-position: -18px -59px;
	width: 10px;
	margin-left: 6px;
	height: 16px;
`

export const HeaderIcon = styled(Icon)`
	position: relative;
	width: 24px;
	height: 24px;
	margin: 0 5px;
`
export const SettingIcon = styled(HeaderIcon)`
	background-position: -96px -110px;
	&:hover {
		background-position: -144px -110px;
	}
`

export const ExitIcon = styled(HeaderIcon)`
	margin-right: 0;
	background-position: -192px -109px;
	&:hover {
		background-position: -240px -109px;
	}
`

export const MsgIcon = styled(HeaderIcon)`
	background-position: 0px -110px;
	&:hover {
		background-position: -48px -110px;
	}
`
export const MsgIconGif = styled(IconGif)`
	background-position: -4px -3px;
	position: relative;
	width: 24px;
	height: 24px;
	margin: 0 5px;
`
export const ReadyIcon = styled.span`
	background-color: red;
	position: absolute;
	border-radius: 4px;
	top: -2px;
	right: -1px;
	width: 8px;
	height: 8px;
`

export const WarningIcon = styled(Icon)`
	background-position: -480px -75px;
	width: 24px;
	height: 24px;
`
export const ClearIcon = styled(Icon)`
	background-position: -2px -748px;
	width: 16px;
	height: 16px;
	clear: none;
`

/*样式布局 */
export const StyledWrap = styled.div`
	height: 54px;
	width: 100%;
	background: #373d41;
	min-width: 1024px;
	* {
		box-sizing: border-box;
	}
	ul {
		list-style: none;
		padding: 0;
		margin: 0;
	}
	a {
		color: #333;
		text-decoration: none;
	}
`

export const StyledHeader = styled(StyledContainer)`
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 100%;
	color: #ffffff;
`

export const StyledHeaderLeft = styled.div`
	display: flex;
	cursor: pointer;
	justify-content: flex-start;
	align-items: center;
	.title {
		margin-left: 8px;
		font-size: 12px;
		line-height: 12px;
		margin-top: 2px;
		font-weight: bold;
	}
`

export const StyledHeaderRight = styled.div`
	display: flex;
	height: 24px;
	line-height: 24px;
	font-size: 12px;
	font-family: 'Microsoft Yahei', 'Microsoft YaHei', 'SimSun';
	.userInfo {
		display: flex;
		margin-right: 8px;
		.avatar {
			width: 24px;
			height: 24px;
			border-radius: 50%;
			margin-right: 5px;
		}
	}
	.msgGif {
	}
`

export const StyledNotifyWrap = styled.div`
	width: 350px;
	height: 260px;
	border: 1px solid #c6c6c6;
	color: #434343;
	padding: 15px 15px 5px;
	cursor: default;
	background: #fff;
	font-size: 12px;

	.notify-top {
		display: flex;
		/* height: 28px; */
		line-height: 28px;
		justify-content: space-between;
		border-bottom: 1px solid #c7c7c7;
		.notify-title {
			font-weight: 600;
		}
		.notify-clear-all {
			color: #007ac0;
			text-decoration: underline;
			font-size: 12px;
			font-weight: 400;
			cursor: pointer;
		}
	}

	.notify-list {
		overflow: auto;
		height: 200px;
		margin-top: 4px;

		.no-notice {
			color: #999999;
			font-size: 12px;
			text-align: center;
			padding-top: 10px;
		}

		.notify-info-li {
			display: flex;
			justify-content: space-between;
			align-items: center;
			height: 43px;
			line-height: 43px;
			padding: 5px 10px;
			&:hover {
				background-color: #2e8cc1;
				color: #ffffff;
				.notify-type-title {
					color: #ffffff;
				}
				.clear-notify {
					background-position: -23px -748px;
				}
			}
		}

		.notify-info {
			display: flex;
			flex: 1;
			a {
				display: flex;
			}
			.notify-type-title {
				font-weight: 700;
				color: #4e4e4e;
				padding-left: 5px;
				max-width: 190px;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
			}
			.notify-type-count {
				padding-left: 5px;
				width: 40px;
				font-weight: bold;
				color: #666666;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
			}
			.notify-subject {
				width: 105px;
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
				cursor: pointer;
			}
		}
	}
`

export const StyledSettingWrap = styled.div`
	width: 116px;
	background: #fff;
	padding: 12px 0px;
	border: 1px solid #e5e5e5;
	font-size: 12px;
	color: #333;
	cursor: default;
	z-index: 1;
	ul li {
		height: 30px;
		line-height: 30px;
		text-align: center;
		cursor: pointer;
		a {
			color: #4e4e4e;
		}
		&:hover {
			background: #46aae4;
			color: #fff;
			a {
				color: #fff;
			}
		}
	}
`
